/**
 * 文件作用：Vue 2 入口，注册路由、Vuex、i18n 与全局插件，并按需启动 mock。
 */
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import i18n from './plugins/i18n'
import './plugins/filters'
import './plugins/directives'
import './plugins/mixins'
import './plugins/bus'
import { CONFIG } from './config'
import { bootstrapMock } from './mock/bootstrap'
import ElementUI from 'element-ui'
import zhCN from 'element-ui/lib/locale/lang/zh-CN'
import 'element-ui/lib/theme-chalk/index.css'
import 'bootstrap/dist/css/bootstrap.css'

Vue.config.productionTip = false
Vue.use(ElementUI, { size: 'small', locale: zhCN })

if (CONFIG.USE_MOCK) {
  bootstrapMock()
}

new Vue({
  router,
  store,
  i18n,
  render: (h) => h(App)
}).$mount('#app')
